//
//  ViewController.m
//  AES
//
//  Created by 刘彦直 on 2017/3/1.
//  Copyright © 2017年 com.szqd. All rights reserved.
//

#import "ViewController.h"
#import "AESHelper.h"

#define SecrectKey @"Per vallum duces Labant"

@interface ViewController () {
    AESHelper *helper;
}

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    helper = [[AESHelper alloc] initWithSecret:SecrectKey];
    
    NSString *orginStr = @"thisistest 很好很强大 哈哈 ，。、'；~！@￥%……&*asdfasdf";
    NSString *encodeString  = [helper AESEncrypt:orginStr];
    
    NSString *decodeString = [helper AESDecrypt:encodeString];
    
    NSLog(@"%@",encodeString);
    NSLog(@"%@",decodeString);
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
